<template>
  <div>
    <h1>{{count}}</h1>
    <button @click="changeCount">累加</button>
  </div>
</template>

<script lang="ts">
  import {defineComponent} from "vue"
  export default defineComponent({
    name:'Abort',
    setup() {
      let count = 2
      const changeCount = ()=>{
      console.log(333)
        count ++
      }
      //setup函数中，return的对象会暴露给模板和组件实例
      return{
        count,
        changeCount
      }
    }
  
  
  })


</script>